<block name="body">
    
    <ul class="tab-nav nav">
        <li class="current"><a href="{:U('Admin/Addons/adminList',array('name'=>'Advertising'))}">广告位管理</a></li>
        <li><a href="{:addons_url('Advertising://Advertisement/advsList')}">广告管理</a></li>
    </ul>

    <div class="tools" style="margin-bottom:10px;">
        <a class="btn" href="{:addons_url('Advertising://Advertising/add')}">新 增</a>
        <button class="btn ajax-post" target-form="ids" url="{:addons_url('Advertising://Advertising/savestatus',array('status'=>1))}">启 用</button>
        <button class="btn ajax-post" target-form="ids" url="{:addons_url('Advertising://Advertising/savestatus',array('status'=>0))}">禁用</button>
        <a class="btn" href="{:addons_url('Advertising://Advertisement/add')}">添加广告</a>
    </div>
    <table style="text-align: center;">
        <thead>
            <tr>
                <th width="20" class="row-selected row-selected"><input class="check-all" type="checkbox"></th>
                <th width="38" style="text-align: center;">序号</th>
                <volist name="list_grid" id="vo">
                    <th width="60" style="text-align: center;">{$vo.title}</th>
                </volist>
                <th width="200" style="text-align: center;">操作</th>
            </tr>
        </thead>
        <tbody>
            <volist name="_list" id="lv" >
            <tr>
                <td><input class="ids" type="checkbox" name="id[]" value="{$lv.id}"></td>
                <td>{$lv.id}</td>
                <volist name="list_grid" id="lk">
                    <td>{:get_addonlist_field($lv, $lk, $name)}</td>
                </volist>
                <td>
                    <a href="{:addons_url('Advertising://Advertisement/add',array('position'=>$lv['id']))}">添加广告</a>
                    <a href="{:addons_url('Advertising://Advertisement/advsList',array('position'=>$lv['id']))}">其下广告</a>
                    <a href="{:addons_url('Advertising://Advertising/edit',array('id'=>$lv['id']))}">编辑</a>
                    <if condition="$lv.status eq 1">
                    <a class="confirm ajax-get" href="{:addons_url('Advertising://Advertising/forbidden',array('id'=>$lv['id']))}">禁用</a>
                    <else/>
                    <a class="confirm ajax-get" href="{:addons_url('Advertising://Advertising/off',array('id'=>$lv['id']))}">启用</a>
                    </if>
                    <a class="confirm ajax-get" href="{:addons_url('Advertising://Advertising/del',array('id'=>$lv['id']))}">删除</a>
                </td>
            </tr>
            </volist>
        </tbody>
    </table>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
</block>